package com.example.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.example.business.entity.SysUser;
import com.example.business.mapper.SysUserMapper;
import com.example.business.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;
    @Override
    public SysUser userlogin (HttpServletRequest request, HttpServletResponse response, SysUser u) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("name",u.getName());
        queryWrapper.eq("password",u.getPassword());
        SysUser sysUser = this.getOne(queryWrapper);
        //判断us是否为空
        if(sysUser==null){
            return null;
        }
return null;
    }

}
